﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using log4net;
using System.Windows.Forms;
using DataDesign.MPP.Utilities;

using PSLibrary = Microsoft.Office.Project.Server.Library;

namespace DataDesign.MPP.AddIn
{
    public class HelperAddIn
    {
        private static log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

        #region ShowMessage
        public static void ShowInfo(string message)
        {
            MessageBox.Show(message, "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

        public static void ShowError(string message)
        {
            MessageBox.Show(message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }

        public static void ShowError(Exception ex)
        {
            MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }

        public static DialogResult ShowYesNoConfirm(string message)
        {
            return MessageBox.Show(message, "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
        }
        #endregion
        
    }
}
